package com.example.sign

import com.example.lib_base.BaseRepo

import com.example.lib_base.Res
import com.example.lib_http.HttpType
import com.example.lib_http.NetworkFactory
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

class SignRepo @Inject constructor() : BaseRepo() {
    private val apiService by lazy { NetworkFactory.factory(HttpType.TOKEN).create(ApiService::class.java) }

//    fun getSigns(): Flow<Res<SignEntity>> {
//        return apiService.getSigns()
fun getSigns(page: String, limit: String): Flow<Res<SignEntity>> {
    return apiService.getSigns(page, limit)
    }
    fun addSign(map: Map<String, Any>): Flow<Res<Any>> {
        return apiService.addSign(mapToJson(map))
    }
}